home *** CD-ROM | disk | FTP | other *** search
- Path: freenet2.freenet.ufl.edu!afn03257
- From: afn03257@freenet2.freenet.ufl.edu (Daniel P Hudson)
- Newsgroups: comp.os.msdos.programmer,comp.lang.c
- Subject: Re: open vs fopen?
- Date: 7 Feb 1996 18:09:37 GMT
- Message-ID: <4fapt1$qmp@huron.eel.ufl.edu>
- References: <uEYFxc9nX8WX083yn@mbnet.mb.ca>
- <4f8qbg$549@chleuasme.francenet.fr>
- NNTP-Posting-Host: freenet2.afn.org
- X-Newsreader: wsOMR/SOUP v1.00 [NR]
-
- In article <4f8qbg$549@chleuasme.francenet.fr>,
- sherlock@micronet.fr wrote:
-
- > natewild@mbnet.mb.ca (Nathan T. Wild) wrote:
-
- > >In C, why would one use open and DOS int handles rather than fopen and
- > >stdio file handles?
-
- > because files opened using open and DOS files handles can be read and
- > write at the same time, while stdio files can't.
-
- Huh? Run that by me again. fopen can open a file for both
- read and write access or just read or just write access.
-
- DOS has nothing to do with permitting read, write, or read/write access,
- that is dependant on the hardware only. Using _dos_open
- returns the dos file handle which can be used with DOS interrupt services,
- this permits you to truncate a file if you wish. FILE is a
- structure about the file it is associated with and the buffer it uses.
- DOS doesn't give buffer info even if your using a buffer.
-
- > suppose you have a database file, with fixed length fields.
- > low level functions(open...) enable the writing of some records and
- > the reading of other without closing the file.
-
- suppose you just use "r+" for the access specifier with fopen().
-
-
-
-